package com.das.mechanic_base.utils;

import com.das.mechanic_base.bean.create.SelectWorkBean;
import com.das.mechanic_base.bean.main.CarBrandBean;

import java.util.Comparator;

public class X3WorkPinyinComparator implements Comparator<SelectWorkBean.ServiceBaseEntityBean> {

    @Override
    public int compare(SelectWorkBean.ServiceBaseEntityBean brandBean, SelectWorkBean.ServiceBaseEntityBean afterBrandBean) {
        //这里主要是用来对ListView里面的数据根据ABCDEFG...来排序
        if (afterBrandBean.getSortLetters().equals("#")) {
            return -1;
        } else if (brandBean.getSortLetters().equals("#")) {
            return 1;
        } else {
            return brandBean.getSortLetters().compareTo(afterBrandBean.getSortLetters());
        }
    }

}
